<!-- 个人中心 -->
<template>
	<view class="personal-wrap" style="background-color: #FFF;">
		<!-- 个人信息卡片 -->
		<view class="userInfo-box">
			<!-- #ifdef APP-PLUS || H5 -->
			<view class="sh-userinfo-box" style="width: 100%; z-index: 999;background-image: linear-gradient(to bottom, #fec9d7, #FFF);">
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
				<view class="sh-userinfo-box" style="width: 100%;z-index: 999;background-image: linear-gradient(to bottom, #fec9d7, #FFF);">
					<!-- #endif -->
					<view class="head-wrap">
						<!-- <view slot="right" class="u-flex u-row-center u-col-center u-m-r-20" v-if="false" @tap="goStore">
						<button class="u-reset-button merchant-btn">切换商家版</button>
					    </view> -->
						<!-- #ifdef APP-PLUS || H5  -->
						<view class="" style="font-weight: 600; font-size: 30rpx; margin-left: 20rpx;height: 20rpx;">
							<!-- 个人中心 -->
						</view>
						<!-- #endif -->
						<!-- H5 APP 标签适配 -->
						<!-- #ifdef APP-PLUS || H5  -->
						<view class="user-head u-flex u-row-between" style="padding-top:20rpx;">
							<!-- #endif -->
							<!-- 微信小程序标签适配 -->
							<!-- #ifdef MP-WEIXIN  -->
							<view class="user-head u-flex u-row-between" style="padding-top:60rpx;">
							<!-- #endif -->
							<view class="u-flex u-flex-box" @tap="userinfo.mobile ? jump('/pages/user/info') : toLogin()">
								<!-- 个人信息 -->
								<view class="info-box">
									<!-- #ifdef APP-PLUS || H5  -->
									<view class="u-flex">
										<view class="head-img-wrap">
											<image class="head-img"
												:src="userinfo.avatar || $IMG_URL + '/imgs/avar.png'" mode="aspectFill">
											</image>
										</view>
										<view class="uni-flex uni-row">
											<text class="user-name u-ellipsis-1"
												style="text-align: center;font-weight: 600;font-size: 32rpx;">
												{{ userinfo.mobile ?  userinfo.name || userinfo.username : '登录/注册' }}
												</text>
												<view class="jifen-box" v-if="userinfo.mobile">
													账号：{{ userinfo.mobile }}
												</view>
										</view>
									</view>

									<!--  #endif -->
									<!-- #ifdef MP-WEIXIN  -->
									<!-- <view class="" style="margin-top: 50rpx;font-weight: 600; font-size: 30rpx;height: 20rpx;"> -->
										<!-- 个人中心 -->
									<!-- </view> -->
									<!--  #endif -->
									<!-- #ifdef MP-WEIXIN  -->
									<view class="u-flex">
										<view class="head-img-wrap">
											<image class="head-img"
												:src="userinfo.avatar || $IMG_URL + '/imgs/avar.png'" mode="aspectFill">
											</image>
										</view>
										<view class="uni-flex uni-row">
											<view style="margin-bottom: 10rpx;">
												<text 
													class="user-name u-ellipsis-1" 
													style="text-align: center;font-weight: 600;font-size: 32rpx;">
														{{ userinfo.mobile ?  userinfo.name || userinfo.username : '登录/注册' }}
												</text>
											</view>
												<view class="jifen-box" v-if="userinfo.mobile">
													账号：{{ userinfo.mobile }}
												</view>
										</view>
									</view>
									<!--  #endif -->
								</view>
							</view>
							<view>
								<view v-if="false" class="u-reset-button code-btn" @tap="onSetting">
									<image class="sign" src="https://image.hzwltb69.com/app/date/2023/footprints.png"></image>
								</view>
							</view>
						</view>
					</view>
				</view>
		</view>
		<view style="background-color: #f5f3f5;border-radius: 32rpx 32rpx 0 0;">
			
		
			<!-- #ifdef APP-PLUS || H5 -->
			<view class="sh-wallet-box u-flex u-m-b-10">
				<!-- #endif -->
				<!-- #ifdef MP-WEIXIN -->
<!-- @tap="jump('/pages/user/wallet/index')" -->
				<view class="sh-wallet-box">
					<!-- #endif -->

					<view class="u-flex wallet-left">
						<!-- <view class="wallet-item  u-col-center" style="width: 240rpx;">
						<image class="balance-img" src="https://image.hzwltb69.com/app/images/zhanghuyue.png"></image>
						<text class="balance-item__title2" style="margin-left: 10rpx;">账户余额</text>
						<image class="balance-img2" src="https://image.hzwltb69.com/app/images/jj.png"></image>
					</view> -->
						<view class="wallet-item  u-col-center" @tap="jump('/pages/user/favorite')">
							<view>
								<view class="gerentuijian">
									<image src="https://image.hzwltb69.com/app/date/2023/user/collect.png"></image>
								</view>
								<view class="gerentuijian2">
									收藏
								</view>
							</view>
						</view>
						<view class="wallet-item  u-col-center"  @tap="jump('/pages/user/storefavorite')">
							<view>
								<view class="gerentuijian">
									<image src="https://image.hzwltb69.com/app/date/2023/user/followStore.png"></image>
								</view>
								<view class="gerentuijian2">
									关注店铺
								</view>
							</view>
						</view>
						<view class="wallet-item  u-col-center" @tap="jump('/pages/public/footprints')">
							<view>
								<view class="gerentuijian">
									<image src="https://image.hzwltb69.com/app/date/2023/user/footprint.png"></image>
								</view>
								<view class="gerentuijian2">
									足迹
								</view>
							</view>
						</view>
						<view class="wallet-item  u-col-center" @tap="jump('/pages/public/webviewlist')">

							<view>
								<view class="gerentuijian">
									<image src="https://image.hzwltb69.com/app/date/2023/user/Notice.png"></image>
								</view>
								<view class="gerentuijian2">
									公告
								</view>
							</view>
						</view>
					</view>
				</view>
				<view>
					<view class="mygoods">
						<view class="my" @tap="jump('/pages/order/list')">
							<!-- <i></i> -->
							<span>我的订单</span>
						</view>
						<view class="all" @tap="jump('/pages/order/list')">
							全部
							<img style="width: 24rpx;height: 24rpx;margin-left: 5rpx;" src="https://image.hzwltb69.com/app/date/2023/user/arrows.svg" alt="">
						</view>
					</view>
					<view class="sh-order-box u-flex  ">
						<view class="order-box u-flex">
							<view class="order-item u-flex-col " @tap="jump('/pages/order/list', { type: order.type })"
								v-for="(order,index) in orderNav" :key="order.id" style="position: relative;">
								<view class="u-flex-col item-box u-col-center">
									<image class="order-img" :src="order.img" mode=""></image>
									<text class="item-title">{{ order.title }}</text>
									<view class="badge" v-if="index==0  && PendingPay>0">{{PendingPay}}</view>
									<view class="badge" v-if="index==1  && Pendingship>0">{{Pendingship}}</view>
									<view class="badge" v-if="index==2  && shippend>0">{{shippend}}</view>
									<!-- <view class="badge" v-if="index==3  && receied>0"></view> -->
								</view>
							</view>
							<view class="order-item u-flex-col " @tap="jump('/pages/order/after-sale/list')" style="position: relative;">
								<view class="u-flex-col item-box u-col-center">
									<image class="order-img" src="https://image.hzwltb69.com/app/date/2023/user/aftersale.png">
									</image>
									<text class="item-title">售后/退款</text>
									<view class="badge" v-if="aftersale>0">{{aftersale}}</view>
								</view>
							</view>
						</view>
					</view>
					<view
					class="upward"
					v-if="isShow"
					@click="pullTop()">
					  <u-icon
					    name="arrow-upward"
						color="#999"
						size="28">
					   </u-icon>
					</view>
				</view>
				<!-- 自定义模块 -->
				<view v-for="(item, index) in userList" :key="item.id">
					<!-- 功能列表 -->
					<sh-cell v-if="item.type === 'nav-list'" :list="item.content.list"></sh-cell>
					<!-- 九宫格列表 -->
					<sh-grid v-if="item.type === 'grid-list'" :list="item.content.list"></sh-grid>
				</view>
				<!-- copyright -->
				<!-- #ifdef H5 -->
				<!-- <view class="tabbar-hack" style="height: 00rpx; width:100%;"></view> -->
				<!-- #endif -->
				<view class="">
					
				</view>
				<view class="recommend">-<text>为你推荐</text>-</view>

				<!-- 分享组件 -->
				<ljshop-share v-model="showShare" posterType="user"></ljshop-share>
				
				<shHotList ref="hotlist" :listType="2" :cart="false"></shHotList>
				<shNavBar :select="4" :list="iconList" :list2="iconList2"></shNavBar>
			</view>
		</view>
</template>

<script>
	import commlogin from '../../util/wxlogin.js'
	import commpasslogin from '../../util/passwxlogin.js'
	import shCell from './components/sh-cell.vue';
	import shGrid from './components/sh-grid.vue';
	import shHotList from './components/sh-hot-goods-usertwo.vue'
	// 已弃用
	// import shTitleCard from './components/sh-title-card.vue';
	// import shBanner from './components/sh-banner.vue';
	// import shRichtext from './components/sh-richtext.vue';
	// import shAdv from './components/sh-adv.vue';
	// import shHotGoodsUser from './components/sh-hot-goods-user.vue';
	import {
		mapMutations,
		mapActions,
		mapState,
		mapGetters
	} from 'vuex';
  import shNavBar from './components/sh-nav-bar.vue';
	import share from '@/ljshop/share';

	export default {
		components: {
			shCell,
			shGrid,
			shHotList,
			shNavBar
			// shHotGoodsUser,
			// shBanner,
			// shTitleCard,
			// shRichtext,
			// shAdv,
		},
		data() {
			return {
				isShow: false,
        iconList: uni.getStorageSync('homeModule'),
        iconList2: uni.getStorageSync('homeModule2'),
				orderNav: [{
						id: 1,
						title: '待付款',
						img: 'https://image.hzwltb69.com/app/date/2023/user/waitpay.png',
						type: 'PENDING_PAYMENT'
					},
					{
						id: 2,
						title: '待发货',
						img: 'https://image.hzwltb69.com/app/date/2023/user/waitsend.png',
						type: 'PENDING_SHIPMENT'
					},
					{
						id: 3,
						title: '待收货',
						img: 'https://image.hzwltb69.com/app/date/2023/user/waitrec.png',
						type: 'SHIPPED'
					},
					{
						id: 4,
						title: '已完成',
						img: 'https://image.hzwltb69.com/app/date/2023/user/waitcom.png',
						type: 'COMPLETED'
					}
					// {
					// 	id: 5,
					// 	title: '退换货',
					// 	img: this.$IMG_URL + '/imgs/user/tab55.png',
					// 	type: 'aftersale'
					// }
				],
				Pendingship: 0,
				aftersale: 0,
				receied: 0,
				shippend: 0,
				PendingPay: 0,
				categoryCurrent: 0, //分类轮播下标
				productFavoriteCount: 0,
				storeFavoriteCount: 0,
				point: 0,
				scrollTop: 0,
				showShare: false,
				enable: false, //是否开启吸顶。
				userinfo: {},
				showgetMobile: true,
				availablebanace: 0,
				balance: 0,
				frozenAmount: 0,
				totalBalance: 0,
				shoporder_payment: 0,
				Distributionorder_payment: 0,
				Waiterorder_payment: 0,
				addjingping: false,
				hasDerivative: uni.getStorageSync('hasDerivative'),
				beiincode: uni.getStorageSync("beiinvcode") ? uni.getStorageSync("beiinvcode") : "L7HEWV",
				userList: [
					{
						"id": 14137,
						"type": "user",
						"category": "user",
						"name": "用户卡片",
						"content": {
							"name": "用户卡片",
							"image": "http://file.shopro.top/uploads/20210518/c4e353836a5d04e92697d22f95d0c5a5.png",
							"style": 2,
							"color": "#eeeeee"
						},
						"decorate_id": 1
					},
					{
						"id": 14139,
						"type": "wallet-card",
						"category": "user",
						"name": "资产卡片",
						"content": {},
						"decorate_id": 1
					}, {
						"id": 14138,
						"type": "order-card",
						"category": "user",
						"name": "订单卡片",
						"content": {},
						"decorate_id": 1
					}, {
						"id": 14140,
						"type": "grid-list",
						"category": "user",
						"name": "宫格列表",
						"content": {
							"name": "",
							"list": [{
									"name": "邀请有礼",
									"image": "https://image.hzwltb69.com/app/date/2023/invitation.png",
									"path": "invite",
									"path_name": "我的收藏",
									"path_type": 2
								},
								// #ifdef APP-PLUS || H5 || MP-WEIXIN
								{
									"name": "推广中心",
									"image": "https://image.hzwltb69.com/app/date/2023/extendscenter.png",
									"path": "/pages/app/commission/team",
									"path_name": "推广中心",
									"path_type": 2
								},
								// #endif
								{
									"name": "对接商家",
									"image": "https://image.hzwltb69.com/app/date/2023/service.png",
									"path": "/pages/app/commission/teamservice",
									//"path": "/pages/app/commission/apply",
									"path_name": "对接人",
									"path_type": 2
								},
								{
									"name": "优惠券",
									"image": "https://image.hzwltb69.com/app/date/2023/usercoupon.png",
									"path": "/pages/goods/coupon",
									"path_name": "优惠券",
									"path_type": 2
								},
								{
									"name": `${this.hasDerivative ? '选品广场' : `我的小店`}`,
									"image": "https://image.hzwltb69.com/app/date/2023/chuchuang.png",
									"path": '/pages/tuandui/list',
									"path_name": `${this.hasDerivative ? '选品广场' : `我的小店`}`,
									"path_type": 2
								},
								// {
								// 	"name": "我的积分",
								// 	"image": "https://image.hzwltb69.com/app/images/integral.png",
								// 	"path": "/pages/user/wallet/score-balance",
								// 	"path_name": "我的积分",
								// 	"path_type": 2
								// }, {
								// 	"name": "我的补贴",
								// 	"image": "https://image.hzwltb69.com/app/images/subsidy.png",
								// 	"path": "/pages/user/subsidy/index",
								// 	"path_name": "我的补贴",
								// 	"path_type": 2
								// }, {
								// 	"name": "余额明细",
								// 	"image": "https://image.hzwltb69.com/app/images/balance.png",
								// 	"path": "/pages/user/wallet/index",
								// 	"path_name": "余额明细",
								// 	"path_type": 2
								// },
								// {
								// 	"name": "对接人申请",
								// 	"image": "/images/service.png",
								// 	"path": "/pages/app/commission/teamserviceapply",
								// 	//"path": "/pages/app/commission/apply",
								// 	"path_name": "对接人",
								// 	"path_type": 1
								// },
								//{
								// 	"name": "我的足迹",
								// 	"image": "/images/footprint.png",
								// 	"path": "/pages/user/view-log",
								// 	"path_name": "我的足迹",
								// 	"path_type": 1,
								// 	},
								//  {
								// 	"name": "到货通知",
								// 	"image": "/images/goodsnews.png",
								// 	"path": "/pages/app/merchant/apply",
								// 	"path_name": "门店入驻",
								// 	"path_type": 1
								// },
								// {
								// 	"name": "收件箱",
								// 	"image": "/images/email.png",
								// 	"path": "",
								// 	"path_name": "收件箱",
								// 	"path_type": 1
								// },
								{
									"name": "个人信息",
									"image": "https://image.hzwltb69.com/app/date/2023/grsetting.png",
									"path": "/pages/user/info",
									"path_name": "个人信息",
									"path_type": 2
								},
								{
									"name": "地址管理",
									"image": "https://image.hzwltb69.com/app/date/2023/address.png",
									"path": "/pages/user/address/list",
									"path_name": "地址管理",
									"path_type": 2
								},
								// #ifdef MP || H5
								{
									"name": "平台客服",
									"image": "https://image.hzwltb69.com/app/date/2023/customerser.png",
									//"path": "/pages/public/chat/index",
									"path": "/pages/kefu/minipingtaikefu",
									"path_name": "平台客服",
									"path_type": 2
								},
								// #endif

								// #ifdef APP
								{
									"name": "平台客服",
									"image": "https://image.hzwltb69.com/app/date/2023/customerser.png",
									//"path": "/pages/public/chat/index",
									"path": "/pages/kefu/minipingtaikefu",
									"path_name": "平台客服",
									"path_type": 2
								},
								// #endif
								// {
								// 	"name": "足迹",
								// 	"image": "https://image.hzwltb69.com/app/date/2023/userfooter.png",
								// 	"path": "/pages/public/footprints",
								// 	"path_name": "足迹",
								// 	"path_type": 2
								// },
								{
									"name": "系统设置",
									"image": "https://image.hzwltb69.com/app/date/2023/setting2.png",
									"path": "/pages/user/setting",
									"path_name": "系统设置",
									"path_type": 1
								},
								{
									"name": "我的钱包",
									"image": "https://image.hzwltb69.com/app/date/2023/user/wallet.png",
									"path": "/pages/user/wallet/index",
									"path_name": "我的钱包",
									"path_type": 1
								},
								// {
								// 	"name": "开启直播",
								// 	"image": "https://image.hzwltb69.com/app/images/kaiqizhibo.png",
								// 	"path": "/pages/user/scan",
								// 	"path_name": "开启直播",
								// 	"path_type": 1
								// },

							]
						},
						"decorate_id": 1
					}
				]
			};
		},
		computed: {
			userHeadData() {
				if (this.userTemplate?.length) {
					return this.userTemplate[0].content;
				}
			}
		},
		// 下拉刷新
		onPullDownRefresh() {
			this.init();
			uni.stopPullDownRefresh();
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
			if (e.scrollTop > 500) {
				this.isShow = true;
			} else {
				this.isShow = false;
			}
		},
		onShow() {
			this.allInit();
			let platform = uni.getSystemInfoSync().platform
			if (platform == "android") {
				this.requestStag()
			}
			this.userList[3].content.list[4] =  {
					"name": `${this.hasDerivative ? '选品广场' : `我的小店`}`,
					"image": "https://image.hzwltb69.com/app/date/2023/chuchuang.png",
					"path": '/pages/tuandui/list',
					"path_name": `${this.hasDerivative ? '选品广场' : `我的小店`}`,
					"path_type": 2
			}
		},
		onReachBottom() {
			this.$refs.hotlist.page += 1
			this.$refs.hotlist.hasUserGet()
		},
		methods: {
			pullTop() {
				uni.pageScrollTo({
					scrollTop: 0, //滚动到距离顶部为0
					duration: 500 //滚动时长
				})
			},
			// getWallet() {
			// 	let that = this;
			// 	that.loadStatus = 'loading';
			// 	that.$http('money.momeycount', {
			// 		UId: uni.getStorageSync("UId"),
			// 	}).then(res => {
			// 		let resx = res.data
			// 		that.loadStatus = 'loadmore';
			// 		this.availablebanace = resx.availablebanace;
			// 		this.balance = resx.availablebanace + resx.frozenAmount;
			// 		this.frozenAmount = resx.frozenAmount;
			// 		this.totalBalance = resx.totalBalance;
			// 		this.shoporder_payment = resx.shoporder_payment
			// 		this.Distributionorder_payment = resx.Distributionorder_payment;
			// 		this.Waiterorder_payment = resx.Waiterorder_payment;
			// 	});
			// },
			requestStag() {
				// plus.android.requestPermissions(['android.permission.READ_EXTERNAL_STORAGE',
				// 	'android.permission.WRITE_EXTERNAL_STORAGE', 'android.permission.READ_PHONE_STATE'
				// ], function(e) {
				// 	if (e.deniedAlways.length > 0) { //权限被永久拒绝
				// 		// 弹出提示框解释为何需要定位权限，引导用户打开设置页面开启
				// 		return
				// 	}
				// 	if (e.deniedPresent.length > 0) { //权限被临时拒绝
				// 		// 弹出提示框解释为何需要定位权限，可再次调用plus.android.requestPermissions申请权限
				// 		return
				// 	}
				// 	if (e.granted.length > 0) { //权限被允许
				// 		//调用依赖获取定位权限的代码
				// 		return
				// 	}
				// }, function(e) {
				// 	return
				// });
			},
			allInit() {
				if (uni.getStorageSync("UId")) {
					// this.initCart();
					this.init();
					this.Orderinit();
					// this.getWallet();
					this.enable = true;
				} else {
					console.log('123')
					this.Pendingship = 0
					this.receied = 0
					this.shippend = 0
					this.PendingPay = 0
					this.categoryCurrent = 0 //分类轮播下标
					this.productFavoriteCount = 0
					this.storeFavoriteCount = 0
					this.point = 0
					this.scrollTop = 0
					this.showShare = false
					this.enable = false //是否开启吸顶。
					this.userinfo = {}
					this.availablebanace = 0
					this.balance = 0	
					this.frozenAmount = 0
					this.totalBalance = 0
					this.shoporder_payment = 0
					this.Distributionorder_payment = 0
					this.Waiterorder_payment = 0
					this.addjingping = false
					this.beiincode = uni.getStorageSync("beiinvcode") ? uni.getStorageSync("beiinvcode") : "L7HEWV",
					this.aftersale = 0,
					this.shippend = 0,
					this.Pendingship = 0,
					this.PendingPay = 0
				}

			},
			onSetting() {
				this.jump('/pages/public/footprints');
			},
			toLogin() {
				this.$Router.push({
				  path:'/pages/public/login'
				})
			},
			// onlevel(id) {
			// 	if (id == 1) {
			// 		return "钻石会员"
			// 	}
			// 	if (id == 2) {
			// 		return "铂金会员"
			// 	}

			// 	if (id == 3) {
			// 		return "黄金会员"
			// 	}

			// 	if (id == 4) {
			// 		return "普通会员"
			// 	}
			// 	return "普通会员"

			// },
			Orderinit() {
				let that = this;
				if (uni.getStorageSync("UId")) {
					that.$http('order.getcount', {
						UId: uni.getStorageSync("UId")
					}).then(res => {
						//等待发货
						that.Pendingship = res.data.shipmentNum
						//已完成 已弃用
						that.receied = res.data.completedNum
						//待收货
						that.shippend = res.data.shippedNum
						//待付款
						that.PendingPay = res.data.paymentNum
						//售后
						that.aftersale = res.data.receivedNum
					});
				}
			},
			jump(path, query) {
				if (uni.getStorageSync("UId") > 0) {

					this.$Router.push({
						path: path,
						query: query
					});
				} else {
					// #ifdef MP-WEIXIN
					uni.showToast({
						title: '请登录后操作',
						icon: 'none'
					});
					// #endif
					// #ifdef APP-PLUS || H5
					uni.navigateTo({
						url: "/subunimodules/uni-id-pages/pages/login/login-withoutpwd?type=" + this.loginType
					})
					// #endif
				}
			},
			onShare() {
				this.showShare = true;
				uni.hideTabBar();
			},
			walletinit() {
				if (uni.getStorageSync("UId")) {
					let that = this;
					that.$http('user.apiinfo', {
						UId: uni.getStorageSync("UId")
					}).then(resx => {
						let res = resx.data.HzMember
						this.isRefresh = false;
						this.productFavoriteCount = res.productFavoriteCount;
						this.storeFavoriteCount = res.storeFavoriteCount;
						this.point = res.point;
					});
				}
			},
			// 初始化
			init() {

				if (uni.getStorageSync("UId")) {
					let that = this;
					that.loadStatus = 'loadmore';
					that.$http('user.apiinfo', {
						UId: uni.getStorageSync("UId"),
					}).then(resx => {
						let res = resx.data.HzMember
						if (JSON.stringify(res)!='{}') {
							if (res.showcc == 1 && !this.addjingping) {
								// this.userList[3].content.list.push(	{
								// 	"name": "精选好物",
								// 	"image": "https://image.hzwltb69.com/app/images/chuchuang.png",
								// 	"path": "/pages/tuandui/list",
								// 	"path_name": "系统设置",
								// 	"path_type": 2
								// })
								this.addjingping = true
							}
							that.userinfo = res
							uni.setStorageSync("userinfo", that.userinfo)
							uni.setStorageSync("mobile", that.userinfo.mobile)
							uni.setStorageSync("qcode", that.userinfo.qcode)
							// uni.setStorageSync("InvitationCode", res.InvitationCode)
						}
					});
				}
			},
			// initCart() {
			// 	if (uni.getStorageSync("cartCount") > 0) {
			// 		if (uni.getStorageSync("cartCount")) {

			// 			uni.setTabBarBadge({
			// 				index: 3,
			// 				text: String(uni.getStorageSync("cartCount"))
			// 			})
			// 		} else {
			// 			uni.removeTabBarBadge({
			// 				index: 3
			// 			})
			// 		}
			// 	}


			// }
		}
	};
</script>

<style lang="scss">
	.personal-wrap{
		.userInfo-box{
			position: sticky;
			top: 0;
			left:0;
			right: 0;
			z-index: 999;
		}
	}
	.badge {
		position: absolute;
		width: 40rpx;
		height: 40rpx;
		/* #ifndef APP-NVUE */
		display: inline-flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		line-height: 28rpx;
		border-radius: 50%;
		font-size: 24rpx;
		z-index: 9;
		transform: scale(0.8);
		transform-origin: center center;
		left: 80rpx;
		top: -15rpx;
		color: #FFF;
		background-color: red;
		white-space: nowrap;
		font-weight: 600;
	}

	// 订单卡片
	.sh-order-box {
		height: 180rpx;
		//background: url("https://image.hzwltb69.com/app/images/backorder.png") no-repeat center / 100% 100%;
		background: #fff;

		width: 720rpx;
		margin-left: 15rpx;
		border-bottom-right-radius: 25rpx;
		border-bottom-left-radius: 25rpx;

		.order-box {
			flex: 4;
		}

		.order-item {
			flex: 1;
			.order-img {
				width: 48rpx;
				height: 48rpx;
			}

			.item-title {
				font-size: 22rpx;
				color: #000;
				line-height: 24rpx;
				margin-top: 30rpx;
			}
		}
	}

	.sh-collect-box {
		background: #fff;
		height: 120rpx;
		//  background-image: linear-gradient(to bottom, #83affd , #C9DDFE);

		width: 720rpx;
		margin-left: 15rpx;
		border-top-right-radius: 25rpx;
		;
		border-top-left-radius: 25rpx;
		;
		z-index: 10;

		.wallet-left {
			flex: 4;
		}

		.wallet-item {
			flex: 1;

			.wallet-img {
				width: 40rpx;
				height: 40rpx;
			}

			.wallet-item__title {
				font-size: 26rpx;
				// font-weight: 600;
				height: 50rpx;
				line-height: 50rpx;
				color: #000;
			}

			.wallet-item__title2 {
				font-size: 24rpx;
				// font-weight: 600;
				height: 50rpx;
				line-height: 50rpx;
				color: #ccc;
			}



		}
	}

	.sh-wallet-box {
		display: flex;
		border-radius: 25rpx;
		z-index: 10;
		padding-top: 32rpx;

		.wallet-left {
			flex: 3;
		}

		.wallet-item {
			flex: 1;
			// height: 150rpx;
			.wallet-img {
				width: 80rpx;
				height: 80rpx;
			}

			.balance-item__title {
				font-size: 24rpx;
				font-weight: 400;
				height: 50rpx;
				line-height: 50rpx;
				color: #000;
				margin-top: 20rpx;
			}

			.balance-item__title2 {
				font-size: 34rpx;
				// font-weight: 600;
				height: 50rpx;
				line-height: 50rpx;
				color: black;
				margin-top: 20rpx;
				margin-top: -80rpx;
				left: 30rpx;
				text-align: center;
			}


		}
	}

	.copyright-box {
		.copyright-text {
			font-size: 22rpx;
			font-weight: 500;
			color: #c4c4c4;
		}
	}

	.modal-box {
		width: 600rpx;

		.btn-hover {
			background-color: rgb(230, 230, 230);
		}

		.modal-head {
			padding-top: 48rpx;
			font-weight: 500;
			text-align: center;
			color: $u-main-color;
		}

		.modal-content {
			padding: 48rpx;
			font-size: 30rpx;
			text-align: center;
			color: $u-content-color;
		}

		.modal-bottom {
			.modal-btn {
				flex: 1;
				height: 100rpx;
				line-height: 100rpx;
				font-size: 32rpx;
				box-sizing: border-box;
				cursor: pointer;
				text-align: center;
				border-radius: 4rpx;
			}

			.cancel-btn {
				color: #666666;
			}

			.save-btn {
				color: #e9b461;
			}
		}
	}

	.sh-userinfo-box {
		/* #ifdef MP-WEIXIN */
		height: calc(var(--status-bar-height) + 250rpx);
		/* #endif */
		
		/* #ifdef APP-PLUS || H5 */
		height: calc(var(--status-bar-height) + 200rpx);
		/* #endif */
		// height: calc(var(--status-bar-height) + 250rpx);
		.u-flex-box{
			/* #ifdef MP-WEIXIN */
			margin-top: 90rpx;
			/* #endif */
			width: 100%;
		}
		.head-wrap {
			width: 100%;
			height: 80%;
			.merchant-btn {
				width: 178rpx;
				height: 64rpx;
				line-height: 64rpx;
				background: #ffffff;
				border-radius: 32rpx;
				font-size: 26rpx;
				font-weight: 500;
				color: #a8700d;
			}
		}

		.user-head {
			width: 100%;
			padding-top: 30rpx;

			.info-box {
				padding-left: 30rpx;

				.head-img-wrap {
					.refresh-btn {
						padding: 0;
						background: none;
						width: 60rpx;
						height: 60rpx;
						border-radius: 50%;
						background: #c9912c;
						top: -10rpx;
						right: 10rpx;
					}
				}

				.head-img {
					width: 108rpx;
					height: 108rpx;
					border-radius: 50%;
					background: #ccc;
					margin-right: 25rpx;
					overflow: hidden;
				}

				.user-name-button {
					font-size: 32rpx;
					font-weight: 500;
					color: #333;
					line-height: 60rpx;
					text-align: left;
					outline: none;
					border:0;
					background: none;
					padding-left: 10rpx;
				}
				.user-name-button::after{
				  border: none;
				}
				.user-level {
					font-size: 30rpx;
					font-weight: 500;
					color: #fda22a;
					line-height: 30rpx;
					padding: 10rpx;
					width: 180rpx;
					text-align: center;
					margin-top: 15rpx;
					background-color: #fff;
					border-radius: 15rpx;
					border: #fff 1rpx solid;
				}
			}

			.tag-box {
				background: rgba(0, 0, 0, 0.2);
				border-radius: 22rpx;
				margin-left: 10rpx;

				.tag-img {
					width: 40rpx;
					height: 40rpx;
					display: inline-block;
					border-radius: 50%;
				}

				.tag-title {
					font-size: 20rpx;
					font-weight: 500;
					color: rgba(255, 255, 255, 1);
					line-height: 40rpx;
					padding: 0 10rpx;
				}
			}

			.code-btn {
				// padding: 30rpx;
				margin-right: 40rpx;
				/* #ifdef MP-WEIXIN */
				margin-top: 100rpx;
				/* #endif */
				.icon-qrcode {
					font-size: 50rpx;
					color: #fff;
				}
			}
		}

		.wallet {
			font-size: 20rpx;
			padding-left: 140rpx;

			.money {
				margin-right: 40rpx;
			}
		}
	}

	// 绑定微信公众号
	.notice-box {
		width: 750rpx;
		height: 70rpx;
		background: rgba(253, 239, 216, 1);
		padding: 0 35rpx;

		.notice-detail {
			font-size: 24rpx;

			font-weight: 400;
			color: rgba(204, 149, 59, 1);
		}

		.bindPhone {
			width: 135rpx;
			line-height: 52rpx;
			background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
			border-radius: 26rpx;
			padding: 0;
			font-size: 26rpx;

			font-weight: 500;
			color: rgba(255, 255, 255, 1);
		}
	}

	.sign {
		padding: 0;
		background: none;
		width: 63rpx;
		height: 43rpx;
		right: 10rpx;
	}

	.gerentuijian {
		width: 180rpx;
		text-align: center;

		height: 50rpx;
		line-height: 50rpx;
		
		image {
			width: 44rpx;
			height: 44rpx;
		}
	}

	.gerentuijian2 {
		font-size: 22rpx;
		color: rgba(80, 80, 80, 1);
		width: 180rpx;
		height: 50rpx;
		line-height: 50rpx;
		text-align: center;
	}

	.mygoods {
		background-color: #fff;
		margin: 18rpx 18rpx 0 15rpx;
		padding: 20rpx 20rpx 0 20rpx;
		display: flex;
		justify-content: space-between;
		border-radius: 20rpx 20rpx 0 0;
		.my {
			// font-size: 28rpx;
			font-weight: 600;
			display: flex;
			align-items: center;
			i{
				width: 1rpx;
				height: 30rpx;
				border-right: 7rpx solid red;
			}
		}

		.all {
			color: #636363;
			font-size: 20rpx;
			display: flex;
			align-items: center;
		}
	}
	.jifen-box{
		color: rgba(114, 103, 99, 1);
		font-size: 26rpx;
		// .star{
		// 	width: 170rpx;
		// 	height: 45rpx;
		// 	border-radius: 20rpx;
  //           background: linear-gradient(90deg, #F2D5AA, #D1A970, #B78947);
		// 	// text-align: center;
		// 	justify-content: center;
		// 	color: #fff;
		// 	line-height: 40rpx;
		// 	overflow: hidden;
		// 	display: flex;
		// 	align-items: center;
		// 	img{
		// 		width: 35rpx;
		// 		height: 35rpx;
		// 	}
		// }
		// .store{
		// 	width: 170rpx;
		// 	height: 45rpx;
		// 	border-radius: 20rpx;
		// 	background: linear-gradient(90deg, #F2D5AA, #D1A970, #B78947);
		// 	// text-align: center;
		// 	color: #fff;
		// 	line-height: 40rpx;
		// 	overflow: hidden;
		// 	display: flex;
		// 	justify-content: center;
		// 	align-items: center;
		// 	margin-left: 20rpx;
		// 	img{
		// 		width: 35rpx;
		// 		height: 35rpx;
		// 	}
		// }
	}
	
	.recommend{
		width: 180rpx;
		height: 40rpx;
		font-size: 28rpx;
		font-weight: bold;
		margin: 24rpx auto 6rpx auto;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
</style>